package com.autotest0304;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;

/**
 * Created by IntelliJ IDEA.
 * User: zm
 * Date: 2025/3/4
 */
public class FirstAutotest {
    public void messi() throws InterruptedException {
        ChromeOptions chromeOptions = new ChromeOptions();
        chromeOptions.addArguments("--remote-allow-origins=*");
        ChromeDriver driver = new ChromeDriver(chromeOptions);


        driver.get("https://www.baidu.com");
        Thread.sleep(3000);
        driver.findElement(By.cssSelector("#kw")).sendKeys("梅西");
        Thread.sleep(3000);
        driver.findElement(By.cssSelector("#su")).click();
        Thread.sleep(3000);
        driver.quit();
    }
}
